import Https from '@/utils/https'

const getParExpressions = (params) => Https.get('/api/v1/dataQuality/manager/getParExpressions', params, { needCode: true })
const tryrun = (params) => Https.post('/api/v1/dataQuality/manager/tryrun', params, { needCode: true, json: false })
const addParExpression = (params) => Https.post('/api/v1/dataQuality/manager/addParExpression', params, { needCode: true })
const deleteParExpression = (params) => Https.post('/api/v1/dataQuality/manager/deleteParExpression', params, { needCode: true, json: false })
const deleteRule = (params) => Https.post('/api/v1/dataQuality/manager/deleteRule', params, { needCode: true, json: false })
const getSchedule = (params) => Https.get('/api/v1/dataQuality/manager/schedule/get', params, { needCode: true })
const saveSchedule = (params) => Https.post('/api/v1/dataQuality/manager/schedule/save', params, { needCode: true })
const saveRule = (params) => Https.post('/api/v1/dataQuality/manager/saveRule', params, { needCode: true })
const getRule = (params) => Https.get('/api/v1/dataQuality/manager/getRule', params, { needCode: true })
const getTableFields = (params) => Https.get('/api/v1/dataQuality/manager/getTableFields', params, { needCode: true })
const getRuleTemplates = (params) => Https.get('/api/v1/dataQuality/manager/getRuleTemplates', params, { needCode: true })

export {
  getParExpressions, tryrun, addParExpression, deleteParExpression, deleteRule, getSchedule, saveSchedule, saveRule, getRule, getTableFields, getRuleTemplates,
}
